package edu.gatech.mobile.scene;

import java.io.File;
import java.util.List;

import org.opencv.core.Mat;
import org.opencv.features2d.DescriptorMatcher;

import android.app.Application;
import android.os.Environment;

public class ApplicationContext extends Application {
	
	
	private List<Long> aboveMaskImages;
	private List<Long> onMaskImages;
	private List<Long> belowMaskImages;
	
	private List<Integer> aboveMaskColors;
	private List<Integer> onMaskColors;
	private List<Integer> belowMaskColors;
	
	private DescriptorMatcher aboveMatcher;
	private DescriptorMatcher onMatcher;
	private DescriptorMatcher belowMatcher;

	private Mat aboveData;
	private Mat onData;
	private Mat belowData;
	
	public static boolean contextLoaded = false;
	
	
	@Override
	public void onCreate() {
		super.onCreate();		
		checkFileDir();
	}

	private void checkFileDir() {
		File sdCard = Environment.getExternalStorageDirectory();
		File myImages = new File(sdCard + "/"+AppConstants.IMG_FOLDER);

		if (!myImages.exists()) {
			myImages.mkdir();
		}
	}

	public List<Long> getAboveMaskImages() {
		return aboveMaskImages;
	}

	public void setAboveMaskImages(List<Long> aboveMaskImages) {
		this.aboveMaskImages = aboveMaskImages;
	}

	public List<Long> getOnMaskImages() {
		return onMaskImages;
	}

	public void setOnMaskImages(List<Long> onMaskImages) {
		this.onMaskImages = onMaskImages;
	}

	public List<Long> getBelowMaskImages() {
		return belowMaskImages;
	}

	public void setBelowMaskImages(List<Long> belowMaskImages) {
		this.belowMaskImages = belowMaskImages;
	}

	public List<Integer> getAboveMaskColors() {
		return aboveMaskColors;
	}

	public void setAboveMaskColors(List<Integer> aboveMaskColors) {
		this.aboveMaskColors = aboveMaskColors;
	}

	public List<Integer> getOnMaskColors() {
		return onMaskColors;
	}

	public void setOnMaskColors(List<Integer> onMaskColors) {
		this.onMaskColors = onMaskColors;
	}

	public List<Integer> getBelowMaskColors() {
		return belowMaskColors;
	}

	public void setBelowMaskColors(List<Integer> belowMaskColors) {
		this.belowMaskColors = belowMaskColors;
	}

	public DescriptorMatcher getAboveMatcher() {
		return aboveMatcher;
	}

	public void setAboveMatcher(DescriptorMatcher aboveMatcher) {
		this.aboveMatcher = aboveMatcher;
	}

	public DescriptorMatcher getOnMatcher() {
		return onMatcher;
	}

	public void setOnMatcher(DescriptorMatcher onMatcher) {
		this.onMatcher = onMatcher;
	}

	public DescriptorMatcher getBelowMatcher() {
		return belowMatcher;
	}

	public void setBelowMatcher(DescriptorMatcher belowMatcher) {
		this.belowMatcher = belowMatcher;
	}

	public Mat getAboveData() {
		return aboveData;
	}

	public void setAboveData(Mat aboveData) {
		this.aboveData = aboveData;
	}

	public Mat getOnData() {
		return onData;
	}

	public void setOnData(Mat onData) {
		this.onData = onData;
	}

	public Mat getBelowData() {
		return belowData;
	}

	public void setBelowData(Mat belowData) {
		this.belowData = belowData;
	}
	
	

}
